﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SMS_Agent.View
{
    public partial class frmLoadPort : Form
    {
        public string COMPort { get; set; }
        public frmLoadPort()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.COMPort = cbbPort.Text;
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void frmLoadPort_Load(object sender, EventArgs e)
        {
            List<string> lstPort = SmsControl.SmsControl.GetListPort().ToList();
            cbbPort.DataSource = lstPort;
        }
    }
}
